<template>
  <dialog-form v-model="dialogVisible"
               title="专栏信息"
               :confirm-button="true"
               @confirm="dialogVisible = false"
               style="width: 600px;"
  >
    <template #content>
      <el-descriptions :column="1"
                       border
                       style="width: 500px"
      >
        <el-descriptions-item label="封面">
          <el-image :src="data.coverUrl" fit="scale-down" style=" height: 200px"/>
        </el-descriptions-item>
        <el-descriptions-item label="专栏名称">{{ data.name }}</el-descriptions-item>
        <el-descriptions-item label="综述">{{ data.summarize }}</el-descriptions-item>
        <el-descriptions-item label="浏览量">{{ data.viewsNo }}</el-descriptions-item>
        <el-descriptions-item label="文章总数">{{ data.totalArticle }}</el-descriptions-item>
        <el-descriptions-item label="状态">
          <el-tag v-if="data.status === 'ENABLE'" type="success">{{ data.status }}</el-tag>
          <el-tag v-else type="danger">{{ data.status }}</el-tag>
        </el-descriptions-item>
        <el-descriptions-item label="创建时间">{{ data.createTime }}</el-descriptions-item>
      </el-descriptions>
    </template>
  </dialog-form>
</template>

<script>
import DialogForm from '@/components/dialog/DialogForm'
import { ref } from 'vue'
export default {
  name: 'classification-detail',
  components: { DialogForm },
  setup () {
    return {
      dialogVisible: ref(false),
      data: ref({})
    }
  }
}
</script>

<style scoped>

</style>
